// 该文件专门用于创建整个应用的路由器
import VueRouter from "vue-router";
import About from "@/pages/About.vue";
import Home from "@/pages/Home.vue";
import News from "@/pages/News.vue";
import Message from "@/pages/Message.vue";
import Detail from "@/pages/Detail.vue";
//创建并暴露一个路由器
 export default new VueRouter({
  routes:[
    {
      path:'/about',
      component:About
    },
    {
      name:'zhuye',
      path:'/home',
      component:Home,
    //   二级路由
      children:[{
        path:'news',  //此处一定不要写成/news
        component:News
      },{
        path:'message',
        component:Message,
        children:[
          {
            name:'xiangqing',
            path:'detail/:id/:title',
            component:Detail
          }
        ]
      }]
    }
  ]
})

